<template>
	<view>
		<view class="liveRedio">
			<view class="" v-for="item in liveVideoList " @click="physicalAddress(item)">
				<image src="http://106.14.56.171:15016/images/video.png" mode="aspectFit" />
				<view class="textList">
					<text>{{item.deviceName}}</text><text>{{item.devicE_STATUSName}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				liveVideoList: '', //prjCode项目号
			}
		},
		onLoad(options) {
			console.log('实时视频', options);
			this.liveVideoList = JSON.parse(options.item);
			this.liveVideos(); //获取项目实时视频

		},
		// 下拉刷新
		onPullDownRefresh() {
			this.ifBottomRefresh = true;
			this.liveVideos();
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		methods: {
			// 获取项目实时视频
			liveVideos() {
				this.liveVideoList.forEach(al => {
					// console.log('aaaaaaaaaa', al);
				})
			},
			// 获取视频实际地址
			physicalAddress(item) {
				// console.log('item视频', item);
				uni.navigateTo({
					url: 'look_video?deviceNo=' + item.deviceNo + '&addRess=' + item.deviceName
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.liveRedio {
		width: 96%;
		margin: auto;
		display: inline-block;
		// background-color: aqua;

		>view {
			display: inline-block;
			width: 40%;
			margin-top: 20rpx;
			margin-left: 8%;
			border-radius: 19rpx;
			background-color: #ffffff;
			padding: 0 0 10rpx 0;

			>image {
				margin-left: 25%;
				margin-top: 30rpx;
				width: 150rpx;
				height: 100rpx;
			}
		}

		// >view:nth-child(2n+1) {
		// 	background-color: blanchedalmond;
		// }
	}

	.liveBroadcast {
		width: 100%;

		>video {
			width: 100%;
			// height: 500rpx;	
		}
	}

	.textList {
		margin: auto;
		padding: 20rpx 0 0 20rpx;
		width: 90%;
		font-size: 26rpx;
		// background-color: aqua;
		text-align: center;
	}
</style>
